package org.example.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.service.SpeakService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping
@RestController
public class MyController {

    /**
     * speak远程服务
     */
    @DubboReference
    private SpeakService speakService;

    @GetMapping("/speak")
    public String speak(String word) {
        return speakService.speak(word);
    }
}
